/*     */ package com.cr.common.core.domain.entity;
/*     */ 
/*     */ import com.cr.common.annotation.Excel;
/*     */ import com.cr.common.core.domain.BaseEntity;
/*     */ import javax.validation.constraints.NotBlank;
/*     */ import javax.validation.constraints.Size;
/*     */ import org.apache.commons.lang3.builder.ToStringBuilder;
/*     */ import org.apache.commons.lang3.builder.ToStringStyle;
/*     */ 
/*     */ public class SysRole extends BaseEntity {
/*     */   private static final long serialVersionUID = 1L;
/*     */   
/*     */   @Excel(name = "角色序号", cellType = Excel.ColumnType.NUMERIC)
/*     */   private Long roleId;
/*     */   
/*     */   @Excel(name = "角色名称")
/*     */   private String roleName;
/*     */   
/*     */   @Excel(name = "角色权限")
/*     */   private String roleKey;
/*     */   
/*     */   @Excel(name = "角色排序", cellType = Excel.ColumnType.NUMERIC)
/*     */   private String roleSort;
/*     */   
/*     */   @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
/*     */   private String dataScope;
/*     */   
/*     */   @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
/*     */   private String status;
/*     */   
/*     */   private String delFlag;
/*     */   
/*     */   private boolean flag = false;
/*     */   
/*     */   private Long[] menuIds;
/*     */   
/*     */   private Long[] deptIds;
/*     */   
/*     */   public SysRole() {}
/*     */   
/*     */   public SysRole(Long roleId) {
/*  62 */     this.roleId = roleId;
/*     */   }
/*     */   
/*     */   public Long getRoleId() {
/*  67 */     return this.roleId;
/*     */   }
/*     */   
/*     */   public void setRoleId(Long roleId) {
/*  72 */     this.roleId = roleId;
/*     */   }
/*     */   
/*     */   public boolean isAdmin() {
/*  77 */     return isAdmin(this.roleId);
/*     */   }
/*     */   
/*     */   public static boolean isAdmin(Long roleId) {
/*  82 */     return (roleId != null && 1L == roleId.longValue());
/*     */   }
/*     */   
/*     */   public String getDataScope() {
/*  87 */     return this.dataScope;
/*     */   }
/*     */   
/*     */   public void setDataScope(String dataScope) {
/*  92 */     this.dataScope = dataScope;
/*     */   }
/*     */   
/*     */   @NotBlank(message = "角色名称不能为空")
/*     */   @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
/*     */   public String getRoleName() {
/*  99 */     return this.roleName;
/*     */   }
/*     */   
/*     */   public void setRoleName(String roleName) {
/* 104 */     this.roleName = roleName;
/*     */   }
/*     */   
/*     */   @NotBlank(message = "权限字符不能为空")
/*     */   @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
/*     */   public String getRoleKey() {
/* 111 */     return this.roleKey;
/*     */   }
/*     */   
/*     */   public void setRoleKey(String roleKey) {
/* 116 */     this.roleKey = roleKey;
/*     */   }
/*     */   
/*     */   @NotBlank(message = "显示顺序不能为空")
/*     */   public String getRoleSort() {
/* 122 */     return this.roleSort;
/*     */   }
/*     */   
/*     */   public void setRoleSort(String roleSort) {
/* 127 */     this.roleSort = roleSort;
/*     */   }
/*     */   
/*     */   public String getStatus() {
/* 132 */     return this.status;
/*     */   }
/*     */   
/*     */   public String getDelFlag() {
/* 137 */     return this.delFlag;
/*     */   }
/*     */   
/*     */   public void setDelFlag(String delFlag) {
/* 142 */     this.delFlag = delFlag;
/*     */   }
/*     */   
/*     */   public void setStatus(String status) {
/* 147 */     this.status = status;
/*     */   }
/*     */   
/*     */   public boolean isFlag() {
/* 152 */     return this.flag;
/*     */   }
/*     */   
/*     */   public void setFlag(boolean flag) {
/* 157 */     this.flag = flag;
/*     */   }
/*     */   
/*     */   public Long[] getMenuIds() {
/* 162 */     return this.menuIds;
/*     */   }
/*     */   
/*     */   public void setMenuIds(Long[] menuIds) {
/* 167 */     this.menuIds = menuIds;
/*     */   }
/*     */   
/*     */   public Long[] getDeptIds() {
/* 172 */     return this.deptIds;
/*     */   }
/*     */   
/*     */   public void setDeptIds(Long[] deptIds) {
/* 177 */     this.deptIds = deptIds;
/*     */   }
/*     */   
/*     */   public String toString() {
/* 182 */     return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 183 */       .append("roleId", getRoleId())
/* 184 */       .append("roleName", getRoleName())
/* 185 */       .append("roleKey", getRoleKey())
/* 186 */       .append("roleSort", getRoleSort())
/* 187 */       .append("dataScope", getDataScope())
/* 188 */       .append("status", getStatus())
/* 189 */       .append("delFlag", getDelFlag())
/* 190 */       .append("createBy", getCreateBy())
/* 191 */       .append("createTime", getCreateTime())
/* 192 */       .append("updateBy", getUpdateBy())
/* 193 */       .append("updateTime", getUpdateTime())
/* 194 */       .append("remark", getRemark())
/* 195 */       .toString();
/*     */   }
/*     */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-common-4.7.0.jar!\com\cr\common\core\domain\entity\SysRole.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */